namespace CSharpPro._1014;

//冒泡排序
public class Work7
{
     public static void Test1()
     {
          double[] a = { 11, 31, 16, 14, 87 };
          double temp;
          for (int i = 0; i < a.Length; i++)
          {
               for (int j = 0; j < a.Length-i-1; j++)
               {
                    if (a[j] > a[j + 1])
                    {
                         temp = a[j];
                         a[j] = a[j+1];
                         a[j+1] = temp;
                    }
               }
          }
     }
}